<%@ page import="com.portico.dept.solarch.ProjectDashboard" %>
<h1><g:message code="default.list.label" args="[entityName]"/></h1>
<g:if test="${flash.message}">
  <div class="message">${flash.message}</div>
</g:if>
<div class="list">
  <table>
    <thead>
    <tr>

      <g:sortableColumn property="id" title="${message(code: 'projectDashboard.id.label', default: 'Id')}"/>

      <g:sortableColumn property="trend" title="${message(code: 'projectDashboard.trend.label', default: 'Trend')}"/>

      <g:sortableColumn property="currentStatus" title="${message(code: 'projectDashboard.currentStatus.label', default: 'Current Status')}"/>

      <g:sortableColumn property="budget" title="${message(code: 'projectDashboard.budget.label', default: 'Budget')}"/>

      <g:sortableColumn property="resources" title="${message(code: 'projectDashboard.resources.label', default: 'Resources')}"/>

      <g:sortableColumn property="timeline" title="${message(code: 'projectDashboard.timeline.label', default: 'Timeline')}"/>

    </tr>
    </thead>
    <tbody>
    <g:each in="${projectDashboardInstanceList}" status="i" var="projectDashboardInstance">
      <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

        <td><g:link action="show" id="${projectDashboardInstance.id}">${fieldValue(bean: projectDashboardInstance, field: "project.name")}</g:link></td>

        <td>${fieldValue(bean: projectDashboardInstance, field: "trend")}</td>

        <td>${fieldValue(bean: projectDashboardInstance, field: "currentStatus")}</td>

        <td>${fieldValue(bean: projectDashboardInstance, field: "budget")}</td>

        <td>${fieldValue(bean: projectDashboardInstance, field: "resources")}</td>

        <td>${fieldValue(bean: projectDashboardInstance, field: "timeline")}</td>

      </tr>
    </g:each>
    </tbody>
  </table>
</div>
<div class="paginateButtons">
  <g:paginate total="${projectDashboardInstanceTotal}"/>
</div>
</div>
